<?php
/**
 * @package Joomla
 * @subpackage Jmonoslideshow
 * @copyright (C) 2010 - Matthieu BARBE - www.ccomca.com
 * @license GNU/GPL v2
 * 
 * Jmonoslideshow is a Joomla extension for Monoslideshow.
 *
 * Jmonoslideshow uses :
 * Monoslideshow (http://www.monoslideshow.com/)
 * Plupload (http://www.plupload.com/) by Moxicode Systems
 * json class by Michal Migurski, Matt Knapp, Brett Stimmerman
 * jquery a JavaScript Library (http://jquery.com/)
 * getid3 library (http://getid3.sourceforge.net/)
 * swfobject is an easy-to-use and standards-friendly method to embed Flash content, which utilizes one small JavaScript file (http://code.google.com/p/swfobject/)
 * Chained Selects jQuery Plugin (http://www.appelsiini.net/2010/jquery-chained-selects)
 *
 * Jmonoslideshow is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

//-- No direct access
defined('_JEXEC') or die();
jimport('joomla.form.formfield');
JLoader::register('MediaHelper', dirname(__FILE__) . DS .'helpers'. DS .'media.php');
//require helper media
require_once( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jmonoslideshow'.DS.'helpers'.DS.'media.php' );
class JFormFieldImageSize extends JFormField
{
	var	$_name = 'ImageSize';

	protected function getTooltip() {
		return '&nbsp;';
	}
	
	protected function getInput()
	{
		return ' ';
	}

	protected function getLabel()
	{	
		if ($this->element['default']) {
			return '<p style="background: #ffffcc;color: #0069CC;padding:5px;clear:left;margin-top:5px;"><img src="'.JURI::root(true).'/media/com_jmonoslideshow/images/admin/icons/'.$this->element['icon'].'"  align="absmiddle" vspace="5" /> '.JText::sprintf( 'COM_JMONOSLIDESHOW_HELP_IMAGESIZE', ini_get('memory_limit'), MediaHelper::getSizeImageLimit() ).' </p>';
		} else {
			return '<hr />';
		}
	}
	
	protected function getTitle()
	{
		return $this->getLabel();
	}
}
?>